<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CopyDirectory</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">CopyDirectory()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#3A3966"><b>CopyDirectory</b></font>(SourceDirectory$, DestinationDirectory$, Pattern$ [, Mode])</blockquote>

<b>概要</b><br><blockquote>



Copy the contents of the source directory to the destination. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>SourceDirectory$</i></td>
<td width="90%"> 
 
The directory to copy. 

 

</td></tr>
<tr><td><i>DestinationDirectory$</i></td>
<td> 
 
The destination to copy the directory to. 

 

</td></tr>
<tr><td><i>Pattern$</i></td>
<td> 
 
A pattern identifying the files to copy. For example: "*.*" will copy any files in the directory. 
"*.exe" will copy only the .exe files. By default, a null Pattern$ ("") will copy all the files. 

 

</td></tr>
<tr><td><i>模式 （可选）</i></td>
<td> 
Options for the copy operation. 可以是下列值的组合︰ 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_FileSystem_Recursive</font>: Copy the directory with all subdirectories.
  <font color="#924B72">#PB_FileSystem_Force</font>    : Overwrites the files which are protected (read-only).
</font></pre>

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns nonzero if the operation was successful and zero if it failed. 

 

</blockquote><p><b>备注</b></p><blockquote>



If the target directory already exists, its content will be overwritten automatically. The 
<a href="filesize.html">FileSize()</a> function can be used to determine if the target exists or not. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">CopyDirectory</font>("D:\Games\MyGame\", "D:\Games\Backup\", "", <font color="#924B72">#PB_FileSystem_Recursive</font>)
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="createdirectory.html">CreateDirectory()</a>, <a href="examinedirectory.html">ExamineDirectory()</a>, <a href="deletedirectory.html">DeleteDirectory()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=checkfilename.html>CheckFilename()</a> - <a href="index.html">FileSystem Index</a> - <a href="copyfile.html">CopyFile()</a> -&gt;<br><br>

</body></html>